//
//  FMDBDishManager.h
//  takeout
//
//  Created by Mac on 12-4-8.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "Dish.h"
#import "DishCategory.h"
@interface FMDBDishManager : NSObject
//插入本地菜系
-(void) insertDishCategories:(FMDatabase *)db dishCategories:(DishCategory *)dishCategory supplierid:(NSInteger)supplierid;
//插入本地菜品
-(void) insertDishes:(FMDatabase *)db dishCategories:(Dish *)dish;
//查询本地菜系
-(void) selectDishCategory;
//查询本地菜品
-(void) selectDish;
//删除菜品
-(void) deleteDish:(NSString *)dishId;
//删除菜系
-(void) deleteDishCategory:(NSString *)DishCategoryId;
-(NSArray *)getAllDishesBySupIdFromLoc:(NSString *)supplierId;
-(void)insertAllDishesBySupIdToLoc:(NSArray *)dishCategories supplierid:(NSInteger)supplierid;
-(Boolean)insertDishesToShoppingCart:(NSArray *)dishesArray;//将用户在菜单页面选择的点菜信息保存到本地数据库
-(Boolean)insertShopsToShoppingCart:(NSDictionary *)shopInfoDictionary;//将用户点过菜的商家信息保存到本地数据库
-(NSArray *)getShopInfo;//查询用户已点过菜的商家信息
-(NSMutableArray *)getDishInfoByShopId:(NSInteger)shopId;//根据商家ID查询用户在这家店点的菜的信息
-(void)updateDishNumber:(NSInteger)dishId newDishNum:(NSInteger)dishNum;//修改某一样菜的数量
-(void)deleteDishByDishIdInShoppingCart:(NSInteger)dishId;//在购物车页面删除某一样菜
-(void)clearShoppingCart;//清空购物车
-(NSDictionary *)getShopInfoByDishId:(NSInteger)shopId;//根据商家ID获取商家信息
@end
